package com.ifacebox.web.admin.upload.client;

import com.ifacebox.web.common.client.OssClient;
import com.ifacebox.web.common.model.UploadProperties;

import java.io.File;
import java.io.IOException;


/**
 * @author znn
 */
public class OssDefaultClient extends OssClient {

    public OssDefaultClient(UploadProperties uploadProperties) {
        super(uploadProperties);
    }

    @Override
    public void upload(String bucketName, String fileName) throws IOException {
        //需要上传到oss的本地文件
        File file = new File(uploadProperties.getLocation(), fileName);
        //调用oss的sdk上传文件
        if (logger.isInfoEnabled()) {
            logger.info("OssDefaultClient.upload({})", file.getAbsolutePath());
        }
    }
}
